# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
# Contributor: Ionut Biru <ibiru@archlinux.org>

pkgname=sushi
pkgver=43.0
pkgrel=1
pkgdesc="A quick previewer for Nautilus"
url="https://gitlab.gnome.org/GNOME/sushi"
arch=(x86_64)
license=(GPL2)
groups=(gnome)
depends=(gtk3 gjs webkit2gtk-4.1 gtksourceview4 evince gst-plugins-base-libs
         gst-plugin-gtk libsoup3)
makedepends=(gobject-introspection git meson)
optdepends=('unoconv: OpenDocument formats')
options=(debug)
_commit=515ea522250689a035d346d919e97fb6f62b0518  # tags/43.0^0
source=("git+https://gitlab.gnome.org/GNOME/sushi.git#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd sushi
  git describe --tags | sed 's/[^-]*-g/r&/;s/-/+/g'
}

prepare() {
  cd sushi
}

build() {
  arch-meson sushi build
  meson compile -C build
}

check() {
  meson test -C build --print-errorlogs
}

package() {
  meson install -C build --destdir "$pkgdir"
}

# vim:set sw=2 sts=-1 et:
